package com.chanyachting.emall.action.recruitmentinformation;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.beanutils.BeanUtils;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.chanyachting.emall.domain.Recruitmentinformation;
import com.chanyachting.emall.form.RecruitmentinformationForm;
import com.chanyachting.emall.service.RecruitmentinformationService;
import com.chanyachting.emall.serviceImpl.RecruitmentinformationServiceImpl;
import com.chanyachting.emall.util.RequestUtil;



/***
 * 刷新招聘信息
 * @author robert
 *
 */
public class RefreshAction extends Action {

	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		
		Recruitmentinformation ri=new Recruitmentinformation();
		
		RecruitmentinformationService ris=new RecruitmentinformationServiceImpl();
		
		RequestUtil ru=new RequestUtil(request);
		
		int id=Integer.parseInt(ru.getParameter("id", "0"));
		
		ri.setId(id);
		
		ri=ris.getOneRecruitmentinformation(ri);

		ris.refreshRecruitmentinformation(ri);
		
		return mapping.findForward("rilist");
	}

	
	
}
